package com.seres.backend.admin;

import java.util.ArrayList;
import java.util.List;

public class ModulesParserResult {
	private String gameStructureName;
	
	private List<CoreModuleLine> coreModuleLines;
	private List<StakeholderModuleLine> stakeholderModuleLines;
	private List<RiskModuleLine> riskModuleLines;
	
	public ModulesParserResult(){
		setCoreModuleLines(new ArrayList<CoreModuleLine>());
		setStakeholderModuleLines(new ArrayList<StakeholderModuleLine>());
		setRiskModuleLines(new ArrayList<RiskModuleLine>());
	}

	public String getGameStructureName() {
		return gameStructureName;
	}

	public void setGameStructureName(String gameStructureName) {
		this.gameStructureName = gameStructureName;
	}

	public List<CoreModuleLine> getCoreModuleLines() {
		return coreModuleLines;
	}

	private void setCoreModuleLines(List<CoreModuleLine> coreModuleLines) {
		this.coreModuleLines = coreModuleLines;
	}

	public List<StakeholderModuleLine> getStakeholderModuleLines() {
		return stakeholderModuleLines;
	}

	private void setStakeholderModuleLines(
			List<StakeholderModuleLine> stakeholderModuleLines) {
		this.stakeholderModuleLines = stakeholderModuleLines;
	}

	public List<RiskModuleLine> getRiskModuleLines() {
		return riskModuleLines;
	}

	private void setRiskModuleLines(List<RiskModuleLine> riskModuleLines) {
		this.riskModuleLines = riskModuleLines;
	}
	public void addCoreModuleLine(CoreModuleLine coreModuleLine){
		getCoreModuleLines().add(coreModuleLine);
	}
	public void addStakeholderModuleLine(StakeholderModuleLine stakeholderModuleLine){
		getStakeholderModuleLines().add(stakeholderModuleLine);
	}
	public void addRiskModuleLine(RiskModuleLine riskModuleLine){
		getRiskModuleLines().add(riskModuleLine);
	}
	public boolean containsModule(int moduleId){
		for(CoreModuleLine coreModuleLine : getCoreModuleLines()){
			if(coreModuleLine.getModuleId() == moduleId){
				return true;
			}
		}
		for(StakeholderModuleLine stakeholderModuleLine : getStakeholderModuleLines()){
			if(stakeholderModuleLine.getModuleId() == moduleId){
				return true;
			}
		}
		return false;
	}

}
